<template>
    <div id="nav">
        <router-view></router-view>
    </div>
</template>

<style>
body {
    margin: 0%;
    
}
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
}
#nav {
    /* padding: 5%; */
    position: absolute;
    margin: auto;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    /* transform: translate(-50%, -50%); */
}
</style>
<script>
import LoginTab from "./components/LoginTab.vue";
import User from "./views/User.vue";
import { ref, h, createVNode } from "vue";
import { provide, nextTick } from 'vue'


export default {
    components: {
        LoginTab,
        User
    },
    computed: {
    },
    setup() {
        const com = ref('user');

        const isRouterActive = ref(true)
        provide('reload', () => {
            isRouterActive.value = false
            nextTick(() => {
                isRouterActive.value = true
            })
        })
        function toggle() {
            com.value = com.value === 'user' ? 'login-tab' : 'user';
        }

        return {
            com,
            toggle
        };
    },
};
</script>